<template>
  <div>
    Home组件 -- {{ title }}
    <div @click="words += '!'">words: {{ words }}</div>
    <div>
      <div @click="name += '!'">name: {{ name }}</div>
      <div @click="age += 1">age: {{ age }}</div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref, reactive, toRefs } from "vue";
export default defineComponent({
  setup() {
    let title: string = "HOME";
    var words = ref("ts + vue");
    const obj = reactive({
      name: "jojo",
      age: 25,
    });

    return { title, words, ...toRefs(obj) };
  },
});
</script>

<style lang="scss">
</style>